package secondriver.springsubway.demo;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.core.Ordered;

public class LifecyleBeanPostProcessor implements BeanPostProcessor , Ordered {

	@Override
	public Object postProcessBeforeInitialization(Object bean, String beanName)
			throws BeansException {
		System.out.println("[postProcessBeforeInitialization] bean:" + bean
				+ " beanName:" + beanName);
		return bean;
	}

	@Override
	public Object postProcessAfterInitialization(Object bean, String beanName)
			throws BeansException {
		System.out.println("[postProcessAfterInitialization] bean:" + bean
				+ " beanName:" + beanName);
		return bean;
	}

	@Override
	public int getOrder() {
		return 0;
	}
}
